package com.wujie.hello.spring.cloud.web.admin.ribbon.controller;

import com.wujie.hello.spring.cloud.web.admin.ribbon.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.client.ServiceInstance;
import org.springframework.cloud.client.loadbalancer.LoadBalancerClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.net.URI;

/**
 * @author wujie
 * @version 1.0.0:
 * @title TestController
 * @Description TODO
 * @dateTime 2020/9/4 11:39
 * @Copyright 2020-2021
 */
@RestController
public class TestController {
    @Autowired
    private AdminService adminService;
    @Value("${server.port}")
    private String port;
    @RequestMapping(value = "hi", method = RequestMethod.GET)
    public String sayHi() {
        return adminService.sayHi(port);
    }
}
